import { Row } from "components/lib";
import { ScreenContainer } from "components/ScreenContainer";
import { useProjectInUrl } from "../billboard/utils";
import { Button } from "antd";
import { EpicList } from "./EpicList";
import { CreateEpicDrawer } from "./CreateEpicDrawer";
import { useEpicDrawer } from "./utils";
import { TaskModal } from "../billboard/TaskModal";

export const EpicScreen = () => {
  const { data: project } = useProjectInUrl();
  const { onOpen } = useEpicDrawer();
  return (
    <ScreenContainer>
      <Row between={true}>
        <h2>{project?.name}任务组</h2>
        <Button type="link" onClick={onOpen}>
          创建任务组
        </Button>
      </Row>
      <EpicList />
      <CreateEpicDrawer />
      <TaskModal />
    </ScreenContainer>
  );
};
